clear all

use policy_combined_v4_seasonal.dta, replace

***Drop missing values***
drop if utility_type==.
drop if disconnected==.
drop if forego_expenses==.
drop if energy_assistance==.
drop if total_covered==.
drop if hh_under5==.
drop if hhsize==.
drop if ownhome==.
drop if hh_over65==.

**Encode respondent ID's**
destring caseid_w1, generate(id)
encode utility, generate(utility2)

svyset id [pweight=weight]



describe id month disconnected total_covered
summarize id month disconnected total_covered

sort id month
xtset id month
xtdescribe
xtsum id month disconnected total_covered

**Clean variables**
gen not_covered=0
replace not_covered=1 if total_covered==0

recode gender (2=0)
gen female=0
replace female=1 if gender==0

recode hh_under5 (2=1) (3=1) (4=1)

drop iou muni coop
gen muni=0
replace muni=1 if utility_type==1
gen iou=0
replace iou=1 if utility_type==2
gen coop=0
replace coop=1 if utility_type==3

label define month_label  1 "May" 2 "June" 3 "July" 4 "August" 5 "September" 6 "October" 7 "November" 8 "December" 9 "January" 10 "February" 11 "March" 12 "April" 13 "May2"
label val month month_label

**Table 4**
eststo clear
estpost summarize black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 coop muni iou if total_covered==0 & month==1
esttab using table_may.rtf, cells("count(fmt(a2)) mean sd min max") label title("Not Covered") nomtitle nonumbe noobs replace
estpost summarize black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 coop muni iou if total_covered==1 & month==1
esttab using table_may.rtf, cells("count(fmt(a2)) mean sd min max") label title("Covered") nomtitle nonumbe noobs append

**Table S6**
eststo clear
estpost summarize black hispanic unemployed educ under_100_fpl hh_under5 hhsize coop muni iou if total_covered==0
esttab using table_months.rtf, cells("count(fmt(a2)) mean sd min max") label title("Not Covered") nomtitle nonumbe noobs replace
estpost summarize black hispanic unemployed educ under_100_fpl hh_under5 hhsize coop muni iou if total_covered==1
esttab using table_months.rtf, cells("count(fmt(a2)) mean sd min max") label title("Covered") nomtitle nonumbe noobs append


**Generate lags**
gen wap_liheap=0
replace wap_liheap=1 if wap==1 | liheap==1

sort month id
by month: gen wapliheap_lag1=wap_liheap[_n-1]

gen other_assistance=0
replace other_assistance=1 if snap==1 | tanf==1 | medicaid==1 | vet_benefits==1 | unemp_insurance==1

sort month id
by month: gen otherassistance_lag1=other_assistance[_n-1]

set scheme s2color

xi i.state
xi i.month
xi i.utility

*****PAPER MODEL GLOBALS*****
global regressors total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop i.month i.state

global days_covered dayscovered_total wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop i.month i.state

global days_covered dayscovered_total wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop i.month i.state

gen interact=month*state

global regressors_interact total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop i.month i.state


**Table 1 Column 3**
reg disconnected $regressors [pweight=weight]
outreg2 using table1.rtf, keep(total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table 2 Column 3**
reg forego_expenses $regressors [pweight=weight]
outreg2 using table2.rtf, keep(total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table 2 Column 6**
reg energy_assist $regressors [pweight=weight]
outreg2 using table2.rtf, keep(total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append


**Table S1 Column 1 Row 3**
reg disconnected total_covered wapliheap_lag1 otherassistance_lag1 /*black*/ hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop i.month i.state [pweight=weight] if black==1
outreg2 using tableS1.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S1 Column 2 Row 3**
reg disconnected total_covered wapliheap_lag1 otherassistance_lag1 black /*hispanic*/ unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop i.month i.state [pweight=weight] if hispanic==1
outreg2 using tableS1.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S1 Column 3 Row 3**
reg disconnected total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ /*under_100_fpl*/ hh_under5 hhsize ownhome hh_over65 iou coop i.month i.state [pweight=weight] if under_100_fpl==1
outreg2 using tableS1.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S1 Column 4 Row 3**
reg disconnected total_covered wapliheap_lag1 otherassistance_lag1 black hispanic /*unemployed*/ educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop i.month i.state [pweight=weight] if unemployed==1
outreg2 using tableS1.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S1 Column 5 Row 3**
reg disconnected total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl /*hh_under5*/ hhsize ownhome hh_over65 iou coop i.month i.state [pweight=weight] if hh_under5==1
outreg2 using tableS1.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append



**Table S2 Column 1 Row 3**
reg forego_expenses total_covered wapliheap_lag1 otherassistance_lag1 /*black*/ hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop i.month i.state [pweight=weight] if black==1 
outreg2 using tableS2.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S2 Column 2 Row 3**
reg forego_expenses total_covered wapliheap_lag1 otherassistance_lag1 black /*hispanic*/ unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop i.month i.state [pweight=weight] if hispanic==1 
outreg2 using tableS2.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S2 Column 3 Row 3**
reg forego_expenses total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ /*under_100_fpl*/ hh_under5 hhsize ownhome hh_over65 iou coop i.month i.state [pweight=weight] if under_100_fpl==1 
outreg2 using tableS2.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S2 Column 4 Row 3**
reg forego_expenses total_covered wapliheap_lag1 otherassistance_lag1 black hispanic /*unemployed*/ educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop i.month i.state [pweight=weight] if unemployed==1  
outreg2 using tableS2.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S2 Column 5 Row 3**
reg forego_expenses total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl /*hh_under5*/ hhsize ownhome hh_over65 iou coop i.month i.state [pweight=weight] if hh_under5==1   
outreg2 using tableS2.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append


**Table S3 Column 1 Row 3**
reg energy_assist total_covered wapliheap_lag1 otherassistance_lag1 unemployed educ under_100_fpl hh_under5 hhsize iou coop i.month i.state [pweight=weight] if black==1 
outreg2 using tableS3.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S3 Column 2 Row 3**
reg energy_assist total_covered wapliheap_lag1 otherassistance_lag1 unemployed educ under_100_fpl hh_under5 hhsize iou coop i.month i.state [pweight=weight] if hispanic==1 
outreg2 using tableS3.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S3 Column 3 Row 3**
reg energy_assist total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ hh_under5 hhsize iou coop i.month i.state [pweight=weight] if under_100_fpl==1
outreg2 using tableS3.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S3 Column 4 Row 3**
reg energy_assist total_covered wapliheap_lag1 otherassistance_lag1 black hispanic under_100_fpl educ hh_under5 hhsize iou coop i.month i.state [pweight=weight] if unemployed==1  
outreg2 using tableS3.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S3 Column 5 Row 3**
reg energy_assist total_covered wapliheap_lag1 otherassistance_lag1 black hispanic under_100_fpl educ unemployed hhsize iou coop i.month i.state [pweight=weight] if hh_under5==1  
outreg2 using tableS3.rtf, keep(total_covered /*wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop*/) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append



**Table S9 Column 3**
reg disconnected $days_covered [pweight=weight]
outreg2 using tableS9.rtf, keep($days_covered) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S9 Column 6**
reg forego_expenses $days_covered [pweight=weight]
outreg2 using tableS9.rtf, keep($days_covered) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S9 Column 9**
reg energy_assist $days_covered [pweight=weight]
outreg2 using tableS9.rtf, keep($days_covered) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append




**Table S4 Column 3**
reg disconnected $regressors_interact [pweight=weight]
outreg2 using tableS4.rtf, keep(total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S4 Column 6**
reg forego_expenses $regressors_interact [pweight=weight]
outreg2 using tableS4.rtf, keep(total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append


**Table S4 Column 9**
reg energy_assist $regressors_interact [pweight=weight]
outreg2 using tableS4.rtf, keep(total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append



**Table S7 Column 3**
logit disconnected $regressors [pweight=weight]
outreg2 using tableS7.rtf, keep(total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S7 Column 6**
logit forego_expenses $regressors [pweight=weight]
outreg2 using tableS7.rtf, keep(total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Tabls S7 Column 9**
logit energy_assistance $regressors [pweight=weight]
outreg2 using tableS7.rtf, keep(total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append


***balanced regressions***
drop if weight_balanced==.

**Table S5 Column 3**
reg disconnected $regressors [pweight=weight_balanced]
outreg2 using tableS5.rtf, keep(total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S5 Column 6**
reg forego_expenses $regressors [pweight=weight_balanced]
outreg2 using tableS5.rtf, keep(total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append

**Table S5 Column 9**
reg energy_assistance $regressors [pweight=weight_balanced]
outreg2 using tableS5.rtf, keep(total_covered wapliheap_lag1 otherassistance_lag1 black hispanic unemployed educ under_100_fpl hh_under5 hhsize ownhome hh_over65 iou coop) stats(coef se) alpha(0.01, 0.05, 0.1) dec(3) pdec(3) append


